/*----------------------------------------------------------------------------*/
/* Team 3647
/* Hanger.java
/* Hanger pneumatics and controls
/*----------------------------------------------------------------------------*/
package edu.wpi.first.wpilibj.templates;

import edu.wpi.first.wpilibj.Solenoid;

public class Hanger {

    private static Solenoid HangerDown = new Solenoid(5);
    private static Solenoid HangerUp   = new Solenoid(6);
    
    private static boolean stopped = false, value = false;
    public static void HangerRun() {
        if (JoySticks.Hanger && !stopped) {
            value = !value;
            if (value) {
                HangerUp();
            } else {
                HangerDown();
            }
            stopped = true;
        } else if (!JoySticks.Hanger) {
            stopped = false;
        }
    }

    private static void HangerDown() {
        HangerDown.set(true);
        HangerUp.set(false);
    }

    private static void HangerUp() {
        HangerUp.set(true);
        HangerDown.set(false);
    }
}
